package red.internal.core.message;

/**
 * @author Jin Zheng
 * @since 2020-05-14
 */
public enum Direction
{
	SEND(0x1),
	RECEIVE(0x2);

	private int value;

	Direction(int value)
	{
		this.value = value;
	}

	public static Direction valueOf(int value)
	{
		for (Direction version : Direction.values())
		{
			if (version.value == value)
				return version;
		}
		return null;
	}

	public int value()
	{
		return value;
	}
}
